package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.Deptheadshist;
import com.wyzz.hr.pojo.Employee;

public abstract class BaseDeptheadshist implements Serializable {

	public BaseDeptheadshist() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseDeptheadshist(String id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BaseDeptheadshist(String id, Employee dhhEmpNo,
			Department dhhDeptNo, Integer dhhIsHead, Date dhhValidFrom,
			String clientNo) {
		hashCode = 0x80000000;
		setId(id);
		setDhhEmpNo(dhhEmpNo);
		setDhhDeptNo(dhhDeptNo);
		setDhhIsHead(dhhIsHead);
		setDhhValidFrom(dhhValidFrom);
		setClientNo(clientNo);
		initialize();
	}

	protected void initialize() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public Integer getDhhIsHead() {
		return dhhIsHead;
	}

	public void setDhhIsHead(Integer dhhIsHead) {
		this.dhhIsHead = dhhIsHead;
	}

	public Date getDhhValidFrom() {
		return dhhValidFrom;
	}

	public void setDhhValidFrom(Date dhhValidFrom) {
		this.dhhValidFrom = dhhValidFrom;
	}

	public Date getDhhValidTo() {
		return dhhValidTo;
	}

	public void setDhhValidTo(Date dhhValidTo) {
		this.dhhValidTo = dhhValidTo;
	}

	public String getClientNo() {
		return clientNo;
	}

	public void setClientNo(String clientNo) {
		this.clientNo = clientNo;
	}

	public Employee getDhhEmpNo() {
		return dhhEmpNo;
	}

	public void setDhhEmpNo(Employee dhhEmpNo) {
		this.dhhEmpNo = dhhEmpNo;
	}

	public Department getDhhDeptNo() {
		return dhhDeptNo;
	}

	public void setDhhDeptNo(Department dhhDeptNo) {
		this.dhhDeptNo = dhhDeptNo;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Deptheadshist))
			return false;
		Deptheadshist deptheadshist = (Deptheadshist) obj;
		if (null == getId() || null == deptheadshist.getId())
			return false;
		else
			return getId().equals(deptheadshist.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Deptheadshist";
	public static String PROP_DHH_EMP_NO = "dhhEmpNo";
	public static String PROP_DHH_VALID_TO = "dhhValidTo";
	public static String PROP_DHH_DEPT_NO = "dhhDeptNo";
	public static String PROP_CLIENT_NO = "clientNo";
	public static String PROP_DHH_IS_HEAD = "dhhIsHead";
	public static String PROP_DHH_VALID_FROM = "dhhValidFrom";
	public static String PROP_ID = "id";
	private int hashCode;
	private String id;
	private Integer dhhIsHead;
	private Date dhhValidFrom;
	private Date dhhValidTo;
	private String clientNo;
	private Employee dhhEmpNo;
	private Department dhhDeptNo;

}
